
xedge-install:
    file.managed: #cp文件到minion端
        - name: /root/xedge-tools.py
        - source: salt://install/xedge/files/xedge-tools.py
        - user: root
        - group: root
        - mode: 755

    cmd.run: #执行本地命令
        - name:  python xedge-tools.py  --zone us  --serverid  {{ grains['id'] }}
        - onlyif: test -f /root/xedge-tools.py
        - require:
            - file: /root/xedge-tools.py


#jdk-env:  #添加java环境的shell
#    cmd.script:
#        - name: salt://base/jdk/profile.sh
